package com.icoding.fw.utils;

import java.util.Locale;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

public class ResourceBundle {

	@Autowired
	private static ReloadableResourceBundleMessageSource messageSource;

	private ResourceBundle() {
	}

	/**
	 * @return current locale
	 */
	public Locale getCurrentLocale() {
		return LocaleContextHolder.getLocale();
	}

	/**
	 * Get String By Key ... Example : msg.hello
	 * 
	 * @param key
	 * @return
	 */
	public String getMessageByKey(String key) {
		return "...";
	}

}
